/********************************************************************
	created:	2009:12:7   21:54:25
	filename: 	application.cpp
	author:		zouyf
	describe:	
*********************************************************************/
#include "stdafx.h"
#include "application.h"

void FApplication::Init(HWND hwnd)
{
	m_SongManager.Init(this);
	m_PlayListManager.Init(this);
	m_AppSetting.Init(this);
	m_SettingPersist.Init(this);
	m_PlayControler.Init(hwnd, &m_PlayListManager);
	m_MainWndhWnd = hwnd;

	m_SettingPersist.Load();
}

void FApplication::Term()
{
	m_SettingPersist.Save();
}

ISongManager* FApplication::GetSongManager()
{
	return &m_SongManager;
}

IPlayListManager* FApplication::GetPlayListManager()
{
	return &m_PlayListManager;
}

IAppSetting* FApplication::GetAppSetting()
{
	return &m_AppSetting;
}

ISettingsPersist* FApplication::GetSettingsPersist()
{
	return &m_SettingPersist;
}

IPlayControler* FApplication::GetPlayControler()
{
	return &m_PlayControler;
}

HWND FApplication::GetMainWndHandle()
{
	return m_MainWndhWnd;
}
